using System;
using System.Collections.Generic;
using System.Text;
using Rapier.Kodachi.Shared;
using System.Drawing;
using System.IO;
using Rapier.Kodachi.WinForm;

namespace Rapier.Kodachi.Actions
{
    public class Rescan : Action
    {
        public Rescan()
            : base(null, "Internal", "Rescan", "Rescan Kodachi's Catalog")
        {
            GetImage = delegate() { return WinForm.Properties.Resources.Search; };
        }

        public override bool IsValidDirect(Item directItem)
        {
            return directItem.Properties.ContainsKey("Kodachi") && directItem.Properties["Kodachi"].Equals(true);
        }

        public override void Execute(Item[] directItems, Item[] indirectItems)
        {
            WindowMain.controller.UpdateCatalog();
        }
    }
}
